if (CMAKE_VERSION VERSION_LESS "3.0")
    cmake_minimum_required(VERSION 2.8)
else ()
    cmake_minimum_required(VERSION 3.6)
endif ()
project(SM2_Sign C)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include_directories(include)

#add_compile_options(-O3)

set(src
        src/utils.c
        src/sm2_sign.c
        src/sm2_bn.c
        src/sm2_bn_table.c
        src/sm3.c
)
add_library(sm2 ${src})

add_executable(main main.c)
target_link_libraries(main LINK_PUBLIC sm2)


